package com.qf.job;

import org.quartz.*;

import java.util.Date;

/**
 * Quartz与Spring整合 Spring的包下接口
 * @author lixu
 */
public class HelloJob implements Job {


    /**
     * 执行的任务
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        JobDetail jobDetail = jobExecutionContext.getJobDetail();
        JobKey key = jobDetail.getKey();
        System.out.println("==="+key.getName()+ "正在执行任务:时间是:" + new Date());


    }
}
